#ifndef PHYSICSOBJECT_H
#define PHYSICSOBJECT_H

#include <math.h>

#define gravity 9.8 * 18
#define PI 3.14
#define ProjectileOriginalX 200
#define ProjectileOriginalY 450

class PhysicsObject
{
public:
	void Initialise(int, int, int, int, float, float, bool);
	bool isColliding(PhysicsObject*);
	void Launch();
	void ProjectileUpdate(float);
	void ToggleLaunched();
	void Fire();

	inline bool Launched() { return isLaunched; };
	inline void setX(int xpos) { x = xpos; };
	inline void setY(int ypos) { y = ypos; };
	inline void setWidth(int w) { width = w; };
	inline void setHeight(int h) { height = h; };
	inline void setVelocity(float v) { velocity = v; };
	inline void setHit(bool Hit) { hit = Hit; };
	inline void setHitting(int item, bool hit) {hitting[item] = hit;};
	inline void setTheta(float angle)	{theta = angle;};

	inline int getX() { return x; };
	inline int getY() { return y; };
	inline int getWidth() { return width; };
	inline int getHeight() { return height; };
	inline float getVelocity() { return velocity; };
	inline float getMass() { return mass; };
	inline float getTheta()	{ return theta; };
	inline float getRestitution() { return e; };
	inline bool getHit() { return hit; };
	inline bool getHitting(int item) { return hitting[item]; };

	protected:
		float velocity, mass, time, theta, e;
		int x, y, width, height, originalX, originalY;
		bool hit, hitting[10], isLaunched; 
};
#endif